//==============================================================================
// MiscUtils.cc
//----------------------------------------------------------------------------
// Some miscellaneous utility functions, frequently used, otherwise homeless.
//
//------------------------------------------------------------------------------
// $Id: MiscUtils.cc,v 1.1 2000/01/31 21:14:39 kdurbin Exp $
//------------------------------------------------------------------------------
// $Log: MiscUtils.cc,v $
// Revision 1.1  2000/01/31 21:14:39  kdurbin
// Initial revision
//
//   
//==============================================================================
//.......1.........2.........3.........4.........5.........6.........7.........8
//

#include "MiscUtils.hh"

typedef long time_t;
#include <time.h>

//---------------------------------------------------
// * StartTiming
//---------------------------------------------------
//
void StartTiming(long &StartTime)
{
  StartTime = (long) clock();
}

//---------------------------------------------------
// * EndTiming
//---------------------------------------------------
// Returns time, in seconds, since StartTime was initialized 
// with StartTiming()
// 
double EndTiming(long StartTime)
{
  long endTime = clock();
  long elapsedTime = endTime - StartTime;
  double dseconds =  (double)elapsedTime/(double)CLOCKS_PER_SEC;
  return(dseconds);
}
